<!--
 * @Description: 缺陷成因查看
 * @Author: Liu Zhiwang
 * @Date: 2021-04-13 17:05:40
 * @LastEditTime: 2021-04-23 12:08:38
 * @LastEditors: Liu Zhiwang
-->
<template>
  <div>
    <base-dialog
      width="980px"
      class="dialog_box"
      :visible.sync="dialogLook.visible"
      :title="dialog.title"
      :loading="dialog.loading"
      :disabled="dialog.disabled"
      :show-default-footer="false"
      @open="beforeOpenDialog">
      <div>
        <table id="customers">
          <tr>
            <td>成因名称</td>
            <td>{{ dialog.form.reasonName }}</td>
            <td>成因编号</td>
            <td>{{ dialog.form.reasonCode }}</td>
          </tr>
          <tr>
            <td>上级成因</td>
            <td>{{ dialog.form.parentName }}</td>
            <td />
            <td />
          </tr>
          <tr>
            <td>成因描述</td>
            <td colspan="3">{{ dialog.form.description }}</td>
          </tr>
        </table>
      </div>
    </base-dialog>
  </div>
</template>
<script>
export default {
  props: {
    dialog: {
      type: Object,
      default() {
        return {}
      }
    },
    dialogLook: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  data() {
    return {}
  },
  watch: {
    'dialogLook.visible'() {
      // if (this.dialogLook.visible) {}
    }
  },
  methods: {
    beforeOpenDialog() {
      this.$nextTick(() => {})
    }
  }
}
</script>
<style lang="scss">
#customers {
  border-collapse: collapse;
  width: 100%;
}
#customers td, #customers th {
  border: 1px solid #DFE6EC;
  font-size: 16px;
  line-height: 1.5;
  padding: 8px 0;
}
#customers tr td:nth-child(odd){
  width: 120px;
  white-space: nowrap;
  padding-left: 20px;
  padding-right: 26px;
  text-align: right;
  background: #E9F2FC;
}
#customers tr td:nth-child(even){
  padding-left: 20px;
  padding-right: 20px;
}
</style>
